import cv2
import matplotlib.pyplot as plt
import numpy as np
from holoviews.core.traversal import hierarchical
from numba import uint8
from sympy.abc import epsilon

def cv_show(name,img):
    cv2.imshow(name,img)
    cv2.waitKey(0)
    cv2.destroyAllWindows()

img = cv2.imread('C:/Users/nic/Desktop/opencv/picture/templet_cat.jpg',cv2.IMREAD_GRAYSCALE)
#图像整体进行均值化
equ = cv2.equalizeHist(img)
#图像分部分进行均值化
clahe = cv2.createCLAHE(clipLimit=2.0,tileGridSize=(8,8))
res_clahe = clahe.apply(img)
#
res = np.hstack((img,equ,res_clahe))
cv_show('img',res)


